package com.simple.datax.bo.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.simple.datax.bo.IDataxFlowActorsTemplateBO;
import com.simple.datax.dao.IDataxFlowActorsTemplateDAO;
import com.simple.datax.vo.DataxFlowActorsTemplateIdVO;
import com.simple.datax.vo.DataxFlowActorsTemplateVO;

@Service("dataxFlowActorsTemplateBO")
@Transactional(propagation=Propagation.REQUIRED,readOnly=true)
public class DataxFlowActorsTemplateBOImpl implements IDataxFlowActorsTemplateBO {

	@Autowired
	private IDataxFlowActorsTemplateDAO dataxFlowActorsTemplateDAO;
	
	@Override
	public List<DataxFlowActorsTemplateVO> findAll() {
		return dataxFlowActorsTemplateDAO.findAll();
	}

	@Override
	@Transactional(propagation=Propagation.REQUIRED,readOnly=false,rollbackFor={Exception.class})
	public void add(DataxFlowActorsTemplateVO dataxFlowActorsTemplateVO) {
		dataxFlowActorsTemplateDAO.saveOrUpdate(dataxFlowActorsTemplateVO);
	}
	
	@Override
	@Transactional(propagation=Propagation.REQUIRED,readOnly=false,rollbackFor={Exception.class})
	public void del(DataxFlowActorsTemplateIdVO id) {
		dataxFlowActorsTemplateDAO.delete(id);
	}

	@Override
	public DataxFlowActorsTemplateVO findById(DataxFlowActorsTemplateIdVO id) {
		return dataxFlowActorsTemplateDAO.findById(id);
	}

	@Override
	public Integer generateId() {
		return dataxFlowActorsTemplateDAO.generateId();
	}

	@Override
	public List<DataxFlowActorsTemplateVO> findByFlowTempId(String flowTempId) {
		return dataxFlowActorsTemplateDAO.findByFlowTempId(flowTempId);
	}

}
